home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cc03.arc / HISTGRAM.C < prev    next >
Text File  |  1986-03-14  |  974b  |  67 lines

  1. #include <stdio.h>
  2.  
  3. #define MAXNUMSTARS    50
  4. #define MAXNUMENTRIES    50
  5. #define NUMTOCLEAR    25
  6. #define VOID        int
  7.  
  8. extern double FindScalingFraction() ;
  9.  
  10. main() {
  11.     int    EntryCount ;    /* looping variable -- the current entry number */
  12.     FILE    *OutFile   ;    /* where we're writing information */
  13.     int    NumEntries ;    /* total number of entries */
  14.     double    ScalingMultiplier    ;    /* the scaling value */
  15.     double    Value[MAXNUMENTRIES] ;    /* all values the user enters */
  16.  
  17.     if ((OutFile = fopen("histgrm6","w")) == 0) {
  18.         fprintf(stderr, "Can't open output file.\n") ;
  19.         exit(0) ;
  20.     }
  21.     ClearScreen() ;
  22.     printf("How many entries will you make? ") ;
  23.     scanf("%d", &NumEntries) ;
  24.     while (NumEntries > MAXNUMENTRIES || NumEntries < 1) {
  25.         printf("\n\tIcan only accept a number between 1 and %d!\n",
  26.             MAXNUMENTRIES) ;
  27.         printf("\nHow many entries will you make") ;
  28.         scanf("%d", &NumEntries) ;
  29.     }
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.